/**
 * 
 */
package javavis.jip2d.functions.tia2012;

import java.io.Serializable;
import java.util.LinkedList;

import javavis.base.JIPException;

/**
 * @author asc
 *
 */
public class Feature2V extends Feature implements Serializable{

	/**
	 * @param posX
	 * @param posY
	 * @param Width
	 * @param Height
	 * @throws JIPException 
	 */
	public Feature2V(int posX, int posY, int Width, int Height)throws JIPException {
		super(posX,posY,Width,Height);
		if(Height%2 != 0 || Height==0 || posX+Width==24){
			throw new JIPException("El tamanyo no se puede dividir entre las regiones");
		}
		//System.out.println("Feature2V"); // + posX + "-" + posY + ":"+ Width + "-" + Height);
		listaRegiones.add(new Region(posX,    posY,               posX+Width,     posY+(Height/2)-1));
		listaRegiones.add(new Region(posX,    posY+(Height/2),    posX+Width,     posY+Height-1));
	}

}
